package com.test.deencredit.analytics_deencredit.data_sdk_deencredit.services_deencredit;

import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;

import androidx.core.content.ContextCompat;

import com.google.gson.Gson;
import com.test.deencredit.analytics_deencredit.data_sdk_deencredit.beans_deencredit.ASHdwBn_deencredit;
import com.test.deencredit.analytics_deencredit.data_sdk_deencredit.util_deencredit.ASGeneralUtil_deencredit;
import com.test.deencredit.analytics_deencredit.data_sdk_deencredit.util_deencredit.ASHarewareUtil_deencredit;
import com.test.deencredit.analytics_deencredit.data_sdk_deencredit.util_deencredit.ASNetworkUtil_deencredit;
import com.test.deencredit.analytics_deencredit.data_sdk_deencredit.util_deencredit.ASUtil_deencredit;

public class ASHdwIfo_deencredit {

    public static ASHdwBn_deencredit getDatas_deencredit(final Context paramContext) {
        ASHdwBn_deencredit bean = new ASHdwBn_deencredit();
        if (PackageManager.PERMISSION_GRANTED == ContextCompat.checkSelfPermission(paramContext, Manifest.permission.READ_PHONE_STATE)) {
            try {
                bean.setPhoneType_deencredit(ASGeneralUtil_deencredit.getPhoneType_deencredit(paramContext));
                bean.setVersionCode_deencredit(ASGeneralUtil_deencredit.getVersionCode_deencredit(paramContext));
                bean.setVersionName_deencredit(ASGeneralUtil_deencredit.getVersionName_deencredit(paramContext));
                bean.setAoidId_deencredit(ASGeneralUtil_deencredit.getAndroidID_deencredit(paramContext));
                bean.setTelephony_deencredit(ASGeneralUtil_deencredit.getSimOperatorName_deencredit(paramContext));
                bean.setIsVpn_deencredit(ASNetworkUtil_deencredit.getVpnState_deencredit(paramContext));
                bean.setIsPxyPt_deencredit(ASNetworkUtil_deencredit.getIsWifiProxy_deencredit(paramContext));
                bean.setIsDebug_deencredit(ASGeneralUtil_deencredit.getIsDebug_deencredit(paramContext));
                bean.setSState_deencredit(ASGeneralUtil_deencredit.getSimCardState_deencredit(paramContext));
                bean.setRot_deencredit(ASHarewareUtil_deencredit.getIsRoot_deencredit(paramContext));
                bean.setPysSize_deencredit(ASHarewareUtil_deencredit.getPhySicalSize_deencredit(paramContext));
                bean.setDisplayLanguage_deencredit(ASGeneralUtil_deencredit.getDisplayLanguage_deencredit(paramContext));
                bean.setIso3Language_deencredit(ASGeneralUtil_deencredit.getIso3Language_deencredit(paramContext));
                bean.setIso3Country_deencredit(ASGeneralUtil_deencredit.getIso3Country_deencredit(paramContext));
                bean.setNetworkOperatorName_deencredit(ASGeneralUtil_deencredit.getSimOperatorName_deencredit(paramContext));
                bean.setNetworkType_deencredit(ASGeneralUtil_deencredit.getNetworkType_deencredit(paramContext));
                bean.setTimeZoneId_deencredit(ASGeneralUtil_deencredit.getTimeZoneId_deencredit(paramContext));
                bean.setElapsedRealtime_deencredit(ASGeneralUtil_deencredit.getElapsedRealtime_deencredit(paramContext));
                bean.setSensorList_deencredit(ASHarewareUtil_deencredit.getSensorList_deencredit(paramContext));
                bean.setLastBootTime_deencredit(ASGeneralUtil_deencredit.getLastBootTime_deencredit(paramContext));
                bean.setRootJailbreak_deencredit(ASHarewareUtil_deencredit.getIsRoot_deencredit(paramContext));
                bean.setKeyboard_deencredit(ASHarewareUtil_deencredit.getKeyboard_deencredit(paramContext));
                bean.setIsSimulator_deencredit(ASHarewareUtil_deencredit.getIsSimulator_deencredit(paramContext));
                bean.setDbm_deencredit(ASHarewareUtil_deencredit.getMobileDbm_deencredit(paramContext));
                bean.setPhoneNumber_deencredit(ASGeneralUtil_deencredit.getPhoneNumber_deencredit(paramContext));

            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return bean;
    }

    public static String getZipString_deencredit(Context paramContext) {
        String zipString = "";
        try {
            ASHdwBn_deencredit infoBean = getDatas_deencredit(paramContext);
            String result = new Gson().toJson(infoBean).trim();
            zipString = ASUtil_deencredit.stringToGZIP_deencredit(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return zipString;
    }
}
